package io.lckgroup.modules.lck.entity.wxmpvo;

import io.lckgroup.modules.lck.entity.ShopFoodEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 小程序菜品列表，封装了菜品规格的类
 *
 * @author huangrui
 */
public class ShopFoodEntityWeixinVo extends ShopFoodEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    public List<ShopFoodSpecEntityWeixinVo> specEntityList = new ArrayList<>();
    //    点菜的数量
    private Integer count;


    //    转换
    public ShopFoodEntityWeixinVo(List<ShopFoodSpecEntityWeixinVo> list, ShopFoodEntity entity) {
        this.specEntityList = list;
        this.setId(entity.getId());
        this.setGoodsTypeId(entity.getGoodsTypeId());
        this.setMerchantId(entity.getMerchantId());
        this.setGoodsName(entity.getGoodsName());
        this.setDescribeInfo(entity.getDescribeInfo());
        this.setPrice(entity.getPrice());
        this.setImgUrl(entity.getImgUrl());
        this.setIsUpper(entity.getIsUpper());
        this.setIsSpecs(entity.getIsSpecs());
        this.setGmtCreate(entity.getGmtCreate());
        this.setGmtModified(entity.getGmtModified());
        this.setCount(0);

    }

    public ShopFoodEntityWeixinVo() {

    }

    public ShopFoodEntityWeixinVo(ShopFoodEntity entity) {
        this.setId(entity.getId());
        this.setGoodsTypeId(entity.getGoodsTypeId());
        this.setMerchantId(entity.getMerchantId());
        this.setGoodsName(entity.getGoodsName());
        this.setDescribeInfo(entity.getDescribeInfo());
        this.setPrice(entity.getPrice());
        this.setImgUrl(entity.getImgUrl());
        this.setIsUpper(entity.getIsUpper());
        this.setIsSpecs(entity.getIsSpecs());
        this.setGmtCreate(entity.getGmtCreate());
        this.setGmtModified(entity.getGmtModified());
        this.setCount(0);
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public List<ShopFoodSpecEntityWeixinVo> getSpecEntityList() {
        return specEntityList;
    }

    public void setSpecEntityList(List<ShopFoodSpecEntityWeixinVo> specEntityList) {
        this.specEntityList = specEntityList;
    }
}
